package com.wo.cloud.admin.controller;

import com.wo.cloud.admin.service.IMenuService;
import com.wo.cloud.admin.util.SysFeignConstant;
import com.wo.cloud.core.entity.Response;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author liry
 * @version 1.0
 * @date Created on 2021/5/15 22:43
 * Description: 权限管理
 */

@RestController
@RequestMapping(SysFeignConstant.SYS_PERMISSION_BASE_URL)
@Api(tags = "权限管理模块")
public class SysPermissionController {

    @Autowired
    private IMenuService menuService;

    // 获取角色权限列表
    @GetMapping("/list")
    public Response<List<String>> list() {
        List<String> permissions = menuService.getPermissions();
        return Response.data(permissions);
    }
}
